<template>
  <div class="home">
    <demo-item-four
      v-for="item in list"
      :key="item.id"
      :num="item.num"
    ></demo-item-four>
    <button @click="change">change</button>
  </div>
</template>

<script>
import demoItemFour from "@/components/demoItemFour.vue";

export default {
  name: "DemoFour",
  components: {
    demoItemFour,
  },
  data() {
    return {
      list: [
        {
          id: 0,
          num: 1,
        },
        {
          id: 1,
          num: 2,
        },
        {
          id: 2,
          num: 3,
        },
      ],
    };
  },
  methods: {
    change() {
      this.list.reverse();
    },
  },
};
</script>
